<?php
/**
 * Created by PhpStorm.
 * User: jocky
 * Date: 29/08/2017
 * Time: 21:10
 */
?>

<div class="login_wrapper">
    <div class="animate form login_form">
        <section class="login_content" style="padding: 0;">
            <form id="form4" style="padding: 0 5px;">
                <h1>找 回 密 码 </h1>
                <div class="form-group">
                    <input name="clientSN" type="text" class="form-control"
                           placeholder="代理编号"
                           data-error="请输入要找回密码的代理编号"/>
                </div>

                <div class="form-group">
                    <input name="password" type="password" class="form-control"
                           placeholder="新设密码"
                           data-error="密码长度为6-12位，且至少包含大写字母、小写字母、数字和特殊字符中的任意两种类型"/>
                </div>

                <div class="form-group" style=" margin-bottom: 5px;">
                    <?php
                    echo \yii\captcha\Captcha::widget([
                        'name' => 'captcha',
                        'captchaAction' => 'password/captcha',
                        'template' => '{input}{image}',
                        'options' => [
                            'class' => 'form-control pull-left',
                            'style' => 'width: 68%;',
                            'placeholder' => "图片验证码",
                            'data-error' => '验证码不能为空',
                            'maxlength' => 4
                        ],

                        'imageOptions' => [
                            'id' => 'captchaImg4',
                            'alt' => '验证码',
                            'title' => '点击刷新',
                            'class' => 'pull-right',
                            'style' => 'width:30%;height:45px;cursor:pointer;border: solid 1px #dedede;',
                            'onclick' => 'getNewCaptcha(4)',
                        ]
                    ]);
                    ?>
                    <div class="clearfix"></div>
                </div>

                <div class="form-group" style=" margin-bottom: 5px;">
                    <div class="input-group">
                        <input name="cellphone" type="text" class="form-control" placeholder="绑定的手机号码"
                               data-error="请输入正确的手机号码">
                        <span class="input-group-btn">
                            <button name="sendSmsBtn" type="button" class="btn btn-primary" onclick="sendSms(4)"
                                    style="width: 101px; margin: 0 0 20px 10px; border-radius: 3px;">
                                发送短信
                            </button>
                        </span>
                    </div>
                </div>

                <div class="form-group">
                    <input name="smsCode" type="text" class="form-control"
                           placeholder="手机短信验证码"
                           data-error="请输入短信验证码"/>
                </div>

                <div class="form-group">
                    <button type="button" class="form-control btn btn-primary" id="loginBtn"
                            onclick="retrievePassword()">
                        重 置
                    </button>
                </div>

                <div class="form-group pull-right">
                    已有帐号？
                    <a href="/login" class="to_register" tabindex="-1"> 登录 </a>
                </div>
                <div class="clearfix"></div>

                <div class="separator">
                    <div style="margin-top: 20px;">
                        <p>
                            Copyright © 2018-<?= date('Y'); ?> All Rights Reserved
                        </p>
                    </div>
                </div>

                <?php
                echo \yii\helpers\Html::hiddenInput(
                    Yii::$app->request->csrfParam,
                    Yii::$app->request->getCsrfToken()
                );
                ?>
            </form>
        </section>
    </div>
</div>

